From: Giovanni Campagna Date: Fri, 22 Oct 2010 13:31:58 +0000 (+0200) Subject: Fix audio volume icon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9626 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6b47b78d4d220bd7fa44ab4a8fd1ab5671d9d7f1;p=gnome-shell.git Fix audio volume icon _volumeChanged should not update the icon if the sink is muted. Fixes the case when shell is started with a muted sink (_mutedChanged is called before _volumeChanged). https://bugzilla.gnome.org/show_bug.cgi?id=632868 --- diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 15cc1f178..be8abd635 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -102,7 +102,6 @@ Indicator.prototype = { this._outputVolumeId = this._output.connect('notify::volume', Lang.bind(this, this._volumeChanged, '_output')); this._mutedChanged (null, null, '_output'); this._volumeChanged (null, null, '_output'); - this.setIcon(this._volumeToIcon(this._output.volume)); } else { this._outputSwitch.label.text = _("Output: Muted"); this._outputSwitch.setToggleState(false); @@ -208,7 +207,7 @@ Indicator.prototype = { _volumeChanged: function(object, param_spec, property) { this[property+'Slider'].setValue(this[property].volume / VOLUME_MAX); this._updateLabel(property); - if (property == '_output') + if (property == '_output' && !this._output.is_muted) this.setIcon(this._volumeToIcon(this._output.volume)); },